import { createRouter, createWebHistory } from 'vue-router'
// import IndexView from "@/views/IndexView.vue";
import UserLogin from "@/views/UserLogin.vue";
import Home from '../views/Home.vue'
import TaskHall from '../views/TaskHall.vue'
import Guild from '../views/Guild.vue'
import Profile from '../views/Profile.vue'

// 静态导入方式（页面少可用）
const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/tasks',
    name: 'TaskHall',
    component: TaskHall
  },
  {
    path: '/guild',
    name: 'Guild',
    component: Guild
  },
  {
    path: '/profile',
    name: 'Profile',
    component: Profile
  },
  {
    path: '/',
    name: 'Login',
    component: UserLogin,
    meta: {
      hideLayout: true // 添加元信息标记，表示此页面不需要布局
    }
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
